
package gov.chinatax.ctcps.generator.form;

import java.text.SimpleDateFormat;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;

/**
 * Form for xtglJhsbsjsz.
 *
 * @author <a href="http://boss.bekk.no/boss/middlegen/"/>Middlegen</a>
 *
 * @struts.form name="xtglJhsbsjszForm"
 */
public class XtglJhsbsjszForm extends ActionForm {

   private final static SimpleDateFormat FORMAT = new SimpleDateFormat("dd.MM.yyyy hh:mm:ss");

   private java.lang.String _szbh = null;
   private java.lang.String _jhxzDm = null;
   private java.lang.String _yf = null;
   private java.lang.String _kzztDm = null;
   private java.lang.String _dwjcDm = null;
   private java.lang.String _dwbh = null;
   private java.lang.String _zt1 = null;
   private java.lang.String _zt2 = null;

   /**
    * Standard constructor.
    */
   public XtglJhsbsjszForm() {
   }

   /**
    * Returns the szbh
    *
    * @return the szbh
    */
   public java.lang.String getSzbh() {
      return _szbh;
   }

   /**
    * Sets the szbh
    *
    * @param szbh the new szbh value
    */
   public void setSzbh(java.lang.String szbh) {
      _szbh = szbh;
   }
   /**
    * Returns the jhxzDm
    *
    * @return the jhxzDm
    */
   public java.lang.String getJhxzDm() {
      return _jhxzDm;
   }

   /**
    * Sets the jhxzDm
    *
    * @param jhxzDm the new jhxzDm value
    */
   public void setJhxzDm(java.lang.String jhxzDm) {
      _jhxzDm = jhxzDm;
   }
   /**
    * Returns the yf
    *
    * @return the yf
    */
   public java.lang.String getYf() {
      return _yf;
   }

   /**
    * Sets the yf
    *
    * @param yf the new yf value
    */
   public void setYf(java.lang.String yf) {
      _yf = yf;
   }
   /**
    * Returns the kzztDm
    *
    * @return the kzztDm
    */
   public java.lang.String getKzztDm() {
      return _kzztDm;
   }

   /**
    * Sets the kzztDm
    *
    * @param kzztDm the new kzztDm value
    */
   public void setKzztDm(java.lang.String kzztDm) {
      _kzztDm = kzztDm;
   }
   /**
    * Returns the dwjcDm
    *
    * @return the dwjcDm
    */
   public java.lang.String getDwjcDm() {
      return _dwjcDm;
   }

   /**
    * Sets the dwjcDm
    *
    * @param dwjcDm the new dwjcDm value
    */
   public void setDwjcDm(java.lang.String dwjcDm) {
      _dwjcDm = dwjcDm;
   }
   /**
    * Returns the dwbh
    *
    * @return the dwbh
    */
   public java.lang.String getDwbh() {
      return _dwbh;
   }

   /**
    * Sets the dwbh
    *
    * @param dwbh the new dwbh value
    */
   public void setDwbh(java.lang.String dwbh) {
      _dwbh = dwbh;
   }
   /**
    * Returns the zt1
    *
    * @return the zt1
    */
   public java.lang.String getZt1() {
      return _zt1;
   }

   /**
    * Sets the zt1
    *
    * @param zt1 the new zt1 value
    */
   public void setZt1(java.lang.String zt1) {
      _zt1 = zt1;
   }
   /**
    * Returns the zt2
    *
    * @return the zt2
    */
   public java.lang.String getZt2() {
      return _zt2;
   }

   /**
    * Sets the zt2
    *
    * @param zt2 the new zt2 value
    */
   public void setZt2(java.lang.String zt2) {
      _zt2 = zt2;
   }


   /**
    * Validate the properties that have been set from this HTTP request,
    * and return an <code>ActionErrors</code> object that encapsulates any
    * validation errors that have been found.  If no errors are found, return
    * <code>null</code> or an <code>ActionErrors</code> object with no
    * recorded error messages.
    *
    * @param mapping The mapping used to select this instance
    * @param request The servlet request we are processing
    */
   public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
      ActionErrors errors = new ActionErrors();
      // test for nullity
      if(getSzbh() == null) {
         errors.add("szbh", new ActionError("error.szbh.required"));
      }
      if(getJhxzDm() == null) {
         errors.add("jhxzDm", new ActionError("error.jhxzDm.required"));
      }
      if(getYf() == null) {
         errors.add("yf", new ActionError("error.yf.required"));
      }
      if(getKzztDm() == null) {
         errors.add("kzztDm", new ActionError("error.kzztDm.required"));
      }
      // TODO test format/data
      return errors;
   }
}
